package com.tueye.dao.impl;

import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import com.tueye.base.util.BaseDao;
import com.tueye.base.util.IBaseHbnDao;
import com.tueye.dao.ILoginDao;
import com.tueye.entity.Admin;
/**
 * 
 * @author hanxiaowei
 *
 */
@Scope("prototype")
@Component("loginDao")
public class LoginDaoImpl  extends BaseDao implements ILoginDao {

	
	@Autowired
	@Qualifier("baseHbnDao")
	private IBaseHbnDao  baseHbnDao;
	
	@SuppressWarnings("unchecked")
	public List getLogonInfo(String username,String password){
		
		List<Admin> results = new ArrayList<Admin>();
		results = baseHbnDao.queryList("from com.tueye.entity.Admin a where a.username='" + username + "' and a.password='"+ password + "'");
		
		return results;
	}
}
